home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-68k-src / machines / amiga68k / libsrc / prof / profiler.h < prev   
C/C++ Source or Header  |  1999-01-01  |  1KB  |  34 lines

  1. /* $VER: profiler.h V0.1 (28.08.98)
  2.  *
  3.  * Portable profiler for vbcc.
  4.  * Copyright (c) 1998  Frank Wille
  5.  *
  6.  * The vbcc profiler is split into a system independant (profiler)
  7.  * and in a system specific (prof_sysdep) part.
  8.  *
  9.  * v0.1  (28.08.98) phx
  10.  *       File created.
  11.  */
  12.  
  13. #include <stdlib.h>
  14. #include <stdio.h>
  15. #include <string.h>
  16.  
  17. #define PROFFILENAME "mon.out"
  18. #define HASHTABSIZE 0x100       /* number of hash table entries */
  19.  
  20. struct prof {
  21.   struct prof *hashchain;       /* next node */
  22.   char *name;                   /* function's name */
  23.   unsigned long called;         /* number of function calls */
  24.   unsigned long totaltime;      /* tot. time (us) in this f. and its sub rout.*/
  25.   /* only used during profiling: */
  26.   unsigned long entrytime;      /* in micros since start of program */
  27.   unsigned long recursion_cnt;  /* function must finish recursion */
  28. };
  29.  
  30. /* system-dependant functions from prof_sysdep.c */
  31. extern int _prof_timerinit(void);
  32. extern unsigned long _prof_time(void);
  33. extern void _prof_timerexit(void);
  34.